import { request } from '@/base/Request';
import { DeviceReset } from '@/base/model/DeviceReset';
import qs from 'qs';

export function getDeviceResetList(params: {
  pageIndex: number,
  pageSize: number,
  sortDirection: string,
  deviceSn: string,
  accountName: string,
}) {
  return request.getPage(DeviceReset, '/api/device-reset', { params });
}

export function restoreFactorySettings(
    id: number
  ) {
    return request.post(DeviceReset, `/api/device-reset/restoreFactorySettings/${id}`, qs.stringify(id));
  }

